In recent years, markup languages such as XML (Extensible Markup Language) have been used as document data processed by a computer. The XML can make it easy to share, via communication network, a structured document and structured data between different information systems, and thus has been increasingly used by computers. Hierarchically structured document data described on the basis of the XML will be hereinafter described as XML data.
Further, an XPath (XML Path Language) query is used to detect desired data from the XML data. The XPath query is a standard query language for the XML data, and is capable of describing a conditional expression for a complicated XML tree structure. In the following description, the XPath query will be simply described as the query.
As described in Japanese Unexamined Patent Application Publication No. 2003-196275, in the field of word processors or like, a user can input a retrieval condition in a natural language to retrieve data. However, to retrieve data from the XML data, it is necessary to specify a query by using a conditional expression. Without special knowledge about the query, the user is unable to easily retrieve data from the XML data.
To specify a query, XML editing software <oXygen/>® provided by SyncRO Soft Ltd. provides a technique of displaying, on a screen, an aggregate structure aggregating the hierarchical structure of the XML data, and automatically generating a query when the user specifies the query on the basis of the displayed aggregate structure.
A summary of the <oXygen/>® will be described. Firstly, <oXygen/>® generates an aggregate structure which aggregates the hierarchical structure of the XML data. For example, FIG. 6 illustrates an aggregate structure of the XML data illustrated in FIG. 2. In the following description, a XML data illustrated in an aggregate structure will be referred to herein as a path trie.
Then, <oXygen/>® displays the path trie on a screen to allow a user to specify an output node. The output node is the node connected to the value (text node) which is to be retrieved. In FIG. 6, if “name” connected under “cast” is specified as the output node by the user, the respective nodes from the root node “Syain” to the specified node “name” are sequentially added to the conditional expression of the query. Thereby, a query “Q=/Syain/ACT/cast/name” is created.